﻿using System.Globalization;
using System.Windows.Controls;

namespace MaxStoreShop.Logic.Validators
{
    public class StringNotEmptyValidator : ValidationRule
    {
        public override ValidationResult Validate(object value, CultureInfo cultureInfo)
        {
            if (value == null || string.IsNullOrWhiteSpace(value.ToString()))
                return new ValidationResult(false, "Это поле не должно быть пустым!");

            return ValidationResult.ValidResult;
        }
    }
}
